﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using DoAnOOP.DataAccessLayer;
using DoAnOOP.BussinessLayer;
//using PDFCreatorPilotLib;

namespace DoAnOOP.SinhVien
{
    public partial class frmKetQua_SinhVien : DevComponents.DotNetBar.Office2007Form
    {

        public frmKetQua_SinhVien()
        {
            InitializeComponent();
        }
        public void Fill()
        {
            clsBusKetQua_SinhVien clsMyKetQua = new clsBusKetQua_SinhVien();
            txt_ho.Text = clsMyKetQua.GetHo();
            txt_mssv.Text = clsMyKetQua.GetMSSV();
            txt_khoa.Text = clsMyKetQua.GetKhoa();
            txt_ten.Text = clsMyKetQua.GetTen();
            dataGridView_KetQua.DataSource = clsMyKetQua.ShowKetQua();
            dateTime_ngaysinh.Value = clsMyKetQua.GetNgaySinh();
            if (clsMyKetQua.GetGioiTinh() == "Nam")
            {
                rbn_nam.Checked = true;
            }
            else
            {
                rbn_nu.Checked = true;
            }
        }

        private void frmKetQua_SinhVien_Load(object sender, EventArgs e)
        {
            Fill();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            //Export();
        }
        //public void Export()
        //{
        //    PDFDocument4Class pdf = new PDFDocument4Class();
        //    pdf.PageSize = PaperFormat.pfA4;
        //    pdf.PageOrientation = PaperOrientation.pPortrait;
        //    int fnt = pdf.AddFont("Arial", true, false, false, false, fontCharset.fcDefault);
        //    pdf.UseFont(fnt, 16); //Đặt font chữ cho đoạn văn bản cần in
        //    pdf.ShowUnicodeTextAt(100, 100, "Chữ cần in");
        //    pdf.Stroke();
        //    SaveFileDialog save = new SaveFileDialog();
        //    string file = save.FileName.ToString();
        //    pdf.SaveToFile(file, true);
        //}


    }
}